<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;
class InsertDataToArticleType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $data = [
            [
                "name" => "购物指南",
                "is_footer" => true
            ],
            [
                "name" => "支付方式",
                "is_footer" => true
            ],
            [
                "name" => "售后服务",
                "is_footer" => true
            ],
            [
                "name" => "配送方式",
                "is_footer" => true
            ],
            [
                "name" => "艺术生活",
                "is_footer" => false
            ],
            [
                "name" => "艺术资讯",
                "is_footer" => false
            ],
        ];
        Db::table("article_types")->insert($data);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Db::table("article_types")->truncate();
    }
}
